<template>
    <div class="title" @click="toDetails">
        <div class="title_left">
            <p class="title_main">{{content.name}}</p>
            <p class="title_more">
                {{content.type}}
                <span>{{content.power_type | type}}</span>
            </p>
        </div>
        <div class="title_right">
            <img class="img_icon" src="/static/img/icon-rightarrow@2x.png" alt="">
        </div>
    </div>
</template>

<script>
export default {
    props: {
        content:{
            type:Object,
            default:()=>{}
        }
    },
    data() {
        return {}
    },
    created() {},
    methods:{
        toDetails(){
            this.$router.push(`/entry/details/${this.content.id}?type=${this.content.power_type}`)
        }
    },
    filters:{
        type(value){
            if(!value) return ''
            if(value == 1) return '所有权'
            if(value == 2) return '许可权'
            if(value == 3) return '所有权 许可权'
        }
    }
}
</script>

<style scoped>
.title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.title_main {
    font-size: 0.36rem;
    font-weight: 600;
    margin-bottom: 0.08rem;
}
.img_icon{
    width: .5rem;
    height: .5rem;
}
</style>
